package api.homework.two.two;

/**
 * @author lwj
 * @date 2025-03-11
 * @vesion 1.0.0
 */
public class MainTest03 {
    public static void main(String[] args) {
        // 创建 Runnable 实现类
        SellingTicketsRunnable sellingTicketsRunnable = new SellingTicketsRunnable();

        // 创建线程对象
        Thread threadRunnable1 = new Thread(sellingTicketsRunnable);
        threadRunnable1.setName("售票员1");
        Thread threadRunnable2 = new Thread(sellingTicketsRunnable);
        threadRunnable2.setName("售票员2");
        Thread threadRunnable3 = new Thread(sellingTicketsRunnable);
        threadRunnable3.setName("售票员3");

        // 启动线程
        threadRunnable1.start();
        threadRunnable2.start();
        threadRunnable3.start();
    }
}
